home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / CHATTER.PAK / CHATDOC.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  65 lines

  1. // chatdoc.h : interface of the CChatDoc class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "chatsock.h"
  14.  
  15. class CChatDoc : public CDocument
  16. {
  17. protected: // create from serialization only
  18.     CChatDoc();
  19.     DECLARE_DYNCREATE(CChatDoc)
  20.  
  21. // Attributes
  22. public:
  23.     BOOL m_bAutoChat;
  24.     CString m_strHandle;
  25.     CChatSocket* m_pSocket;
  26.     CSocketFile* m_pFile;
  27.     CArchive* m_pArchiveIn;
  28.     CArchive* m_pArchiveOut;
  29.  
  30. // Operations
  31. public:
  32.     BOOL ConnectSocket(LPCTSTR lpszHandle, LPCTSTR lpszAddress, UINT nPort);
  33.     void ProcessPendingRead();
  34.     void SendMsg(CString& strText);
  35.     void ReceiveMsg();
  36.     void DisplayMsg(LPCTSTR lpszText);
  37.  
  38. // Overrides
  39.     // ClassWizard generated virtual function overrides
  40.     //{{AFX_VIRTUAL(CChatDoc)
  41.     public:
  42.     virtual BOOL OnNewDocument();
  43.     virtual void DeleteContents();
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     virtual ~CChatDoc();
  49.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  50. #ifdef _DEBUG
  51.     virtual void AssertValid() const;
  52.     virtual void Dump(CDumpContext& dc) const;
  53. #endif
  54.  
  55. protected:
  56.  
  57. // Generated message map functions
  58. protected:
  59.     //{{AFX_MSG(CChatDoc)
  60.     //}}AFX_MSG
  61.     DECLARE_MESSAGE_MAP()
  62. };
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65.